﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class ShoppingHistory : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            loadOrder();
        }
    }
    private void loadOrder()
    {
        ChoDienTuDataContext cdt = new ChoDienTuDataContext();
        String username = Session["UserName"].ToString();
        var user = cdt.Select_CustomerByUsername(username).First();
        lstBill.DataSource = cdt.Select_OrderByCusID(user.ID);
        lstBill.DataBind();
    }
}